PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


HitTestThemeScrollBarArrows

Returns whether the user clicked upon the specified scroll bar's arrows.

pascal Boolean HitTestThemeScrollBarArrows (
                     const Rect *scrollBarBounds,
                     ThemeTrackEnableState enableState,
                     ThemeTrackPressState pressState,
                     Boolean isHoriz,
                     Point ptHit,
                     Rect *trackBounds,
                     ControlPartCode *partcode);
scrollBarBounds
A pointer to a structure of type Rect . Before calling HitTestThemeScrollBarArrows , set the rectangle to the boundary of the scroll bar, in local coordinates. Typically, the rectangle you specify is the entire base control rectangle--that is, the value contained in the contrlRect field of the scroll bar's ControlRecord structure.
enableState
A value of type ThemeTrackEnableState . Pass a constant specifying the current state of the scroll bar; see Theme Track Enable State Constants for descriptions of possible values.
pressState
A value of type ThemeTrackPressState . Pass a constant specifying what is pressed in an active scroll bar or 0 if nothing is pressed; the press state is ignored if the scroll bar is not active. See Theme Track Press State Constants for descriptions of possible values.
isHoriz
A value of type Boolean . Pass true if the scroll bar is horizontal; pass false if it is vertical.
ptHit
A structure of type Point . Pass the point, specified in local coordinates, where the mouse-down event occurred. Your application may retrieve this value from the where field of the event structure.
trackBounds
A pointer to a structure of type Rect . On return, the rectangle contains the bounds of the track portion of the scroll bar; this rectangle excludes the area containing the scroll bar arrows. Pass NULL if you do not wish to obtain this information.
partcode
A pointer to a value of type ControlPartCode . On return, this value specifies the arrow in which the mouse-down event occurred.
function result
A value of type Boolean . If true , the mouse-down event occurred inside the scroll bar arrows; otherwise, false .
DISCUSSION

Your application may use the HitTestThemeScrollBarArrows function to test whether a given mouse-down event occurred on a scroll bar's arrows. If not, you may then use the rectangle produced in the trackBounds parameter of HitTestThemeScrollBarArrows as the bounds of the track for the function HitTestThemeTrack , in order to determine whether the mouse-down event occurred in the track part of the scroll bar.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)